function setMqttStatus(status){
    localStorage.setItem('mqtt-enabled', status);
}

function getMqttStatus(){
   let status= localStorage.getItem('mqtt-enabled');
   if (status==null || status=="") return false;   
   return status=="true";
}

function setButtonStatus(){
   let mqttStatus= getMqttStatus();
   let startBtn= document.getElementById('startMqttBtn');
   if (startBtn!=null){
       startBtn.disabled = mqttStatus==false;
   }

   let mqttSinkBtn= document.getElementById('startMqttSinkBtn');
   if (mqttSinkBtn!=null){
       mqttSinkBtn.disabled = mqttStatus==false;    
   }
}
